package com.aspose.cells;

class zami {
   static Object a(Object var0) {
      if (var0 instanceof zst) {
         switch(null.a[((zst)var0).ordinal()]) {
         case 1:
         case 2:
         case 3:
         case 4:
         case 5:
         case 6:
            return true;
         }
      }

      return false;
   }

   static Object b(Object var0) {
      if (var0 == null) {
         return 1.0D;
      } else if (var0 instanceof zst) {
         return 16.0D;
      } else {
         switch(zamo.a(var0.getClass())) {
         case 3:
            return 4.0D;
         case 9:
            return 1.0D;
         case 14:
            return 1.0D;
         case 16:
            return 1.0D;
         case 18:
            return 2.0D;
         default:
            return com.aspose.cells.a.c.zc.a(var0) ? 64.0D : 1.0D;
         }
      }
   }

   static Object a(Object var0, boolean var1) {
      if (var0 == null) {
         return 0.0D;
      } else if (var0 instanceof zst) {
         return var0;
      } else {
         switch(zamo.a(var0.getClass())) {
         case 3:
            if ((Boolean)var0) {
               return 1.0D;
            }

            return 0.0D;
         case 9:
            return (double)(Integer)var0;
         case 14:
            return var0;
         case 16:
            return CellsHelper.getDoubleFromDateTime((DateTime)var0, var1);
         case 18:
            return 0.0D;
         default:
            return com.aspose.cells.a.c.zc.a(var0) ? a((Object[])((Object[])var0), var1) : 0.0D;
         }
      }
   }

   static Object a(Object[] var0, boolean var1) {
      Object var2 = com.aspose.cells.b.a.za.a((Object[])var0, 0);
      Object[][] var3 = new Object[var0.length][];
      int var4;
      if (com.aspose.cells.a.c.zc.a(var2)) {
         var4 = ((Object[])((Object[])var2)).length;

         for(int var5 = 0; var5 < var0.length; ++var5) {
            var3[var5] = new Object[var4];
            var2 = com.aspose.cells.b.a.za.a(var0, var5);
            if (var2 == null) {
               for(int var8 = 0; var8 < var4; ++var8) {
                  var3[var5][var8] = 0.0D;
               }
            } else {
               Object[] var6 = (Object[])((Object[])var2);

               for(int var7 = 0; var7 < var4; ++var7) {
                  var3[var5][var7] = a(com.aspose.cells.b.a.za.a(var6, var7), var1);
               }
            }
         }
      } else {
         for(var4 = 0; var4 < var0.length; ++var4) {
            var3[var4] = new Object[1];
            var3[var4][0] = a(com.aspose.cells.b.a.za.a(var0, var4), var1);
         }
      }

      return var3;
   }

   static Object c(Object var0) {
      if (var0 == null) {
         return zst.c;
      } else {
         if (var0 instanceof zst) {
            switch(null.a[((zst)var0).ordinal()]) {
            case 1:
               return 2.0D;
            case 2:
               return 5.0D;
            case 3:
               return 1.0D;
            case 4:
               return 6.0D;
            case 5:
               return 4.0D;
            case 6:
               return 3.0D;
            case 7:
               return 7.0D;
            }
         }

         return zst.c;
      }
   }

   static Object b(Object var0, boolean var1) {
      var0 = zyn.e(var0, var1);
      if (var0 instanceof zst) {
         return var0;
      } else {
         int var2 = com.aspose.cells.b.a.ze.f(var0);
         return var2 % 2 != 0;
      }
   }

   static Object c(Object var0, boolean var1) {
      var0 = zyn.e(var0, var1);
      if (var0 instanceof zst) {
         return var0;
      } else {
         int var2 = com.aspose.cells.b.a.ze.f(var0);
         return var2 % 2 == 0;
      }
   }

   static Object d(Object var0) {
      if (var0 == null) {
         return false;
      } else if (!com.aspose.cells.a.c.zc.a(var0)) {
         switch(zamo.a(var0.getClass())) {
         case 18:
            return false;
         default:
            return true;
         }
      } else {
         Object[] var1 = (Object[])((Object[])var0);
         Object[][] var2 = new Object[var1.length][];

         for(int var3 = 0; var3 < var1.length; ++var3) {
            if (com.aspose.cells.b.a.za.a(var1, var3) != null) {
               Object[] var4 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var1, var3));
               var2[var3] = new Object[var4.length];

               for(int var5 = 0; var5 < var4.length; ++var5) {
                  if (com.aspose.cells.b.a.za.a(var4, var5) == null) {
                     var2[var3][var5] = true;
                  } else {
                     switch(zamo.a(com.aspose.cells.b.a.za.a(var4, var5).getClass())) {
                     case 18:
                        var2[var3][var5] = false;
                        break;
                     default:
                        var2[var3][var5] = true;
                     }
                  }
               }
            }
         }

         return var2;
      }
   }

   static Object e(Object var0) {
      if (var0 == null) {
         return false;
      } else if (!com.aspose.cells.a.c.zc.a(var0)) {
         switch(zamo.a(var0.getClass())) {
         case 18:
            return true;
         default:
            return false;
         }
      } else {
         Object[] var1 = (Object[])((Object[])var0);
         Object[][] var2 = new Object[var1.length][];

         for(int var3 = 0; var3 < var1.length; ++var3) {
            if (com.aspose.cells.b.a.za.a(var1, var3) != null) {
               Object[] var4 = (Object[])((Object[])com.aspose.cells.b.a.za.a(var1, var3));
               var2[var3] = new Object[var4.length];

               for(int var5 = 0; var5 < var4.length; ++var5) {
                  if (com.aspose.cells.b.a.za.a(var4, var5) == null) {
                     var2[var3][var5] = false;
                  } else {
                     switch(zamo.a(com.aspose.cells.b.a.za.a(var4, var5).getClass())) {
                     case 18:
                        var2[var3][var5] = true;
                        break;
                     default:
                        var2[var3][var5] = false;
                     }
                  }
               }
            }
         }

         return var2;
      }
   }
}
